﻿// Decompiled with JetBrains decompiler
// Type: TaleWorlds.CampaignSystem.MapNotificationTypes.SettlementUnderSiegeMapNotification
// Assembly: TaleWorlds.CampaignSystem, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E85F8C15-4DF6-4E9C-A58A-29177E40D07A
// Assembly location: D:\steam\steamapps\common\Mount & Blade II Bannerlord\bin\Win64_Shipping_Client\TaleWorlds.CampaignSystem.dll

using System.Collections.Generic;
using TaleWorlds.CampaignSystem.Party;
using TaleWorlds.CampaignSystem.Settlements;
using TaleWorlds.CampaignSystem.Siege;
using TaleWorlds.Core;
using TaleWorlds.Localization;
using TaleWorlds.SaveSystem;

#nullable disable
namespace TaleWorlds.CampaignSystem.MapNotificationTypes
{
  public class SettlementUnderSiegeMapNotification : InformationData
  {
    internal static void AutoGeneratedStaticCollectObjectsSettlementUnderSiegeMapNotification(
      object o,
      List<object> collectedObjects)
    {
      ((InformationData) o).AutoGeneratedInstanceCollectObjects(collectedObjects);
    }

    protected override void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)
    {
      base.AutoGeneratedInstanceCollectObjects(collectedObjects);
      collectedObjects.Add((object) this.BesiegerParty);
      collectedObjects.Add((object) this.BesiegedSettlement);
    }

    internal static object AutoGeneratedGetMemberValueBesiegerParty(object o)
    {
      return (object) ((SettlementUnderSiegeMapNotification) o).BesiegerParty;
    }

    internal static object AutoGeneratedGetMemberValueBesiegedSettlement(object o)
    {
      return (object) ((SettlementUnderSiegeMapNotification) o).BesiegedSettlement;
    }

    public override TextObject TitleText => new TextObject("{=siegeevent}Siege");

    public override string SoundEventPath => "event:/ui/notification/settlement_under_siege";

    [SaveableProperty(10)]
    public MobileParty BesiegerParty { get; private set; }

    [SaveableProperty(20)]
    public Settlement BesiegedSettlement { get; private set; }

    public SettlementUnderSiegeMapNotification(SiegeEvent siegeEvent, TextObject descriptionText)
      : base(descriptionText)
    {
      this.BesiegerParty = siegeEvent.BesiegerCamp.LeaderParty;
      this.BesiegedSettlement = siegeEvent.BesiegedSettlement;
    }
  }
}
